package com.db.worksheet;



import com.ibatis.common.resources.*;

import com.db.worksheet.*;

import com.ibatis.sqlmap.client.*;

import java.io.*;
import java.util.*;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

public class WorkSheetDAO {
private SqlMapClientTemplate template;
	
	
	public void setTemplate(SqlMapClientTemplate template) {
		this.template = template;
	}
	
	public  List<WorkSheetVO> sheetAllData(int type)
			throws Exception {
		return template.queryForList("sheetAllData", type);
	}

	public  WorkSheetVO callContentData(int no) throws Exception {
		return (WorkSheetVO) template.queryForObject("callContentData", no);
	}
	
	public  void insertsheet(WorkSheetVO vo) throws Exception {
		template.insert("insertsheet", vo);
	}
	public String name(int sabun)throws Exception
	{
		String result = (String)template.queryForObject("name",sabun);
		return result;
	}
	public String deptname(int sabun)throws Exception
	{
		String result = (String)template.queryForObject("deptname",sabun);
		return result;
	}
	public List<WorkSheetVO> sheetTodayData_man(int sabun)throws Exception
	{
		return template.queryForList("sheetTodayData_man",sabun);
	}
	public List<WorkSheetVO> sheetTodayData_team(int depttype)throws Exception
	{
		return template.queryForList("sheetTodayData_team",depttype);
	}
	
	public WorkSheetVO Content(int no)throws Exception
	{
		return (WorkSheetVO) template.queryForObject("Content",no);
	}
	
}
